<template>
  <!-- 流量 -->
  <view class="bg-white" style="height:100%">
    <!-- 主体内容 -->
    <view class="padding">
      <!-- 标题 -->
      <view v-if="!isIntroduceDetail">
        <view class="text-xl text-primary">{{ $t('JLink.groups.netCellular') }}</view>
        <view class="text-primary text-sm margin-tb-xs">{{ $t('JLink.describe.netCellular.introduce') }}</view>
      </view>
      <!-- 支持开通的设备列表 -->
      <device-list v-if="!isIntroduceDetail" :supportDeviceObj="supportDeviceObj"
                   @click="handleSelectDevice"></device-list>
      <!-- logo -->
      <image :src="`https://statics.xmcsrv.net/weixin/cloud/netCellular/zh/logo.png`" style="width:100%;"
             mode="widthFix"></image>
    </view>
    <!-- 按钮 -->
    <buttons v-if="buttonMessage.fail" :classifyId="classifyId" :message="buttonMessage.message"></buttons>
  </view>
</template>

<script>
import {getDevice} from './mixins'
import buttons from './module/buttons/buttons'
import deviceList from './module/deviceList/deviceList'

export default {
  mixins: [getDevice],
  components: {
    deviceList,
    buttons,
  },
  props: {
    deviceInfo: {
      type: Object,
      default: () => {
        return {
          modalName: null
        }
      }
    }
  },
  data() {
    return {
      isIntroduceDetail: false,
    }
  },
  mounted() {
    if (this.deviceInfo) {
      this.isIntroduceDetail = this.deviceInfo.isIntroduceDetail
    }
  },
  onLoad(opt) {
  },
  onShow() {
    this.$postPointData({code: '600403', eventName: 'click_item_home_cloud_flow'})
  },
  methods: {}
}
</script>

<style lang="less" scoped>
@import '@/common/style/main.css';
</style>